<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>排期设置</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		
		<link rel="stylesheet" href="__TMPL__/public/assets/css/mui.min.css" />
		<link rel="stylesheet" href="__TMPL__/public/assets/css/style.css" />
		<script type="text/javascript" src="__TMPL__/public/assets/js/jquery.1.9.1.js" ></script>
		<script type="text/javascript" src="__TMPL__/public/assets/js/rem.js" ></script>
		
		<script>
			window.onload = function() { 
				$(".load").removeClass("load"); 

			}; 

		</script>
		
		<link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/mui.picker.min.css" />
	</head>
	<body>
		<!--加载遮罩-->
		<div class="load"></div>
		
		<div class="index">
			<div class="title">
				<a href="index" class="t-back mui-icon mui-icon-back"></a>
				<h2>排期设置</h2>
			</div>
			<div class="t-zw"></div>
			
			<div class="det-m">
				<div class="dm-a">
					活动日期设置：<input type="text"  placeholder="theday" id="date" value="theday" class="date" data-options='{"type":"date"}'/>
				</div>
				
				<div class="dm-b">
					{$name.name}： <input type="text" id="grade" value="一年级" value="1" />
								   <input type="hidden" id="gradee" value="" />
					<input type="hidden" name="id" id="id" value="{$name.id}">
				</div>
				
				<div class="dm-box">
					<div class="db-left">
						<ul>
							<li id="ban" class="on">1班</li>
							<li id="ban" value="2">2班</li>
							<li id="ban" value="3">3班</li>
							<li id="ban" value="4">4班</li>
							<li id="ban" value="5">5班</li>
							<li id="ban" value="6">6班</li>
							<li id="ban" value="7">7班</li>
							<li id="ban" value="8">8班</li>
							<li id="ban" value="9">9班</li>
							<li id="ban" value="10">10班</li>
							<li id="ban" value="11">11班</li>
							<li id="ban" value="12">12班</li>
							<li id="ban" value="13">13班</li>
							<li id="ban" value="14">14班</li>
							<li id="ban" value="15">15班</li>
						</ul>
					</div>
					<div class="db-right">
						<div class="dr-m dr-0" style="display: block;">
							<div class="dr-a">
								<p class="dr-p1">课程表</p>
								<ul class="ts">									
								<input type="text" id="id0" value="[[=it.lessonNames[0].lesson_id]]">
									<li>
										<span>9:00-9:40</span>
											<notempty name="lessonName0">
								            <input type="hidden" id="id0" value="{$lessonName0}">
								            <else>
								               <input type="hidden" id="id0" value="">
								            </notempty>

										<select name="eaids" id="my_level-names">
											
											<notempty name="lessonNames">
								             <option value="{$nameid}" <if condition="$lessonNames">selected</if>>{$lessonNames}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>9:45-10:25</span>
											<notempty name="lessonName1">
								            <input type="hidden" id="id1" value="{$lessonName1}">
								            <else>
								               <input type="hidden" id="id1" value="">
								            </notempty>
											
										<select name="eaids1" id="my_level-names1">
											<notempty name="lessonNames1">
								             <option value="{$nameid1}" <if condition="$lessonNames1">selected</if>>{$lessonNames1}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>10:30-11:05</span>
											<notempty name="lessonName2">
								            <input type="hidden" id="id2" value="{$lessonName2}">
								            <else>
								               <input type="hidden" id="id2" value="">
								            </notempty>
											
										<select name="eaids2" id="my_level-names2">
											<notempty name="lessonNames2">
								             <option value="{$nameid2}" <if condition="$lessonNames2">selected</if>>{$lessonNames2}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>13:30-14:10</span>
											<notempty name="lessonName3">
								            <input type="hidden" id="id3" value="{$lessonName3}">
								            <else>
								               <input type="hidden" id="id3" value="">
								            </notempty>
											
										<select name="eaids3" id="my_level-names3">
											<notempty name="lessonNames3">
								             <option value="{$nameid3}" <if condition="$lessonNames3">selected</if>>{$lessonNames3}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>14:15-15:05</span>
											<notempty name="lessonName4">
								            <input type="hidden" id="id4" value="{$lessonName4}">
								            <else>
								               <input type="hidden" id="id4" value="">
								            </notempty>
											
										<select name="eaids4" id="my_level-names4">
											<notempty name="lessonNames4">
								             <option value="{$nameid4}" <if condition="$lessonNames4">selected</if>>{$lessonNames4}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>15:05-16:00</span>
											<notempty name="lessonName5">
								            <input type="hidden" id="id5" value="{$lessonName5}">
								            <else>
								               <input type="hidden" id="id5" value="">
								            </notempty>
											
										<select name="eaids5" id="my_level-names5">
											<notempty name="lessonNames5">
								             <option value="{$nameid5}" <if condition="$lessonNames5">selected</if>>{$lessonNames5}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>16:05-16:45</span>
											<notempty name="lessonName6">
								            <input type="hidden" id="id6" value="{$lessonName6}">
								            <else>
								               <input type="hidden" id="id6" value="">
								            </notempty>
											
										<select name="eaids6" id="my_level-names6">
											<notempty name="lessonNames6">
								             <option value="{$nameid6}" <if condition="$lessonNames6">selected</if>>{$lessonNames6}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li>
										<span>16:05-16:45</span>
										
											<notempty name="lessonName7">
								            <input type="hidden" id="id7" value="{$lessonName7}">
								            <else>
								               <input type="hidden" id="id7" value="">
								            </notempty>
											
										<select name="eaids7" id="my_level-names7">
											<notempty name="lessonNames7">
								             <option value="{$nameid7}" <if condition="$lessonNames7">selected</if>>{$lessonNames7}</option>
								            <else>
								               <option value="0"></option>
								            </notempty>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>

								</ul>

								<input type="hidden" name="fgfg" id="fgfg" value="">

								<ul class="td">
									<li class="n0">
										<span>9:00-9:40</span>
											<input type="hidden" id="leid" value="">
											
										<select name="eaid" id="my_level-name">
											<option id="name0" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li class="n1">
										<span>9:45-10:25</span>
											<input type="hidden" id="leid1" value="">
											
										<select name="eaid1" id="my_level-name1">
											<option id="name1" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									
									<li class="n2">
										<span>10:30-11:05</span>
											<input type="hidden" id="leid2" value="">
											
										<select name="eaid2" id="my_level-name2">
											<option id="name2" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li class="n3">
										<span>13:30-14:10</span>
											<input type="hidden" id="leid3" value="">
											
										<select name="eaid3" id="my_level-name3">
											<option id="name3" value=""></option>

											<foreach name="lessons" item="lesson">
												<if condition="$lesson.name_id == 5">
													<option value="{$lesson.name_id}" selected>{$lesson.title}</option>
												<else/>
													<option value="{$lesson.name_id}">{$lesson.title}</option>
												</if>
												
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li class="n4">
										<span>14:15-15:05</span>
											<input type="hidden" id="leid4" value="">
											
										<select name="eaid4" id="my_level-name4">
											<option id="name4" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li class="n5">
										<span>15:05-16:00</span>
											<input type="hidden" id="leid5" value="">
											
										<select name="eaid5" id="my_level-name5">
											<option id="name5" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li class="n6">
										<span>16:05-16:45</span>
											<input type="hidden" id="leid6" value="">
											
										<select name="eaid6" id="my_level-name6">
											<option id="name6" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
									<li class="n7">
										<span>16:05-16:45</span>
											<input type="hidden" id="leid7" value="">
											
										<select name="eaid7" id="my_level-name7">
											<option id="name7" value=""></option>
											<foreach name="lessons" item="lesson">
											<option value="{$lesson.name_id}">{$lesson.title}</option>
											</foreach>
										</select>
										<button type="button" class="mui-icon mui-icon-closeempty"></button>
									</li>
								</ul>
							</div>
							<div class="dr-b">
								<p class="dr-p1">课程名称</p>
								<ul>
								<foreach name="lessons" item="lessons">
									<li>{$lessons.title}</li>
								</foreach>
								</ul>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>

			<div class="det-zw"></div>
			<div class="det-btn"><button type="button" id="ff">提交排期</button></div>
			
		</div>
		
		<script type="text/javascript" src="__TMPL__/public/assets/js/mui.min.js" ></script>
		<script type="text/javascript" src="__TMPL__/public/assets/js/public.js" ></script>
		
		<!--日期选择-->
		<script src="__TMPL__/public/assets/js/mui.picker.min.js"></script>

		<script type="text/javascript">
			
				
				$(function(){
					$("#ff").click(function() {
						if ($('#fgfg').val() != '') {
						var formData = new FormData

						var options=$('#my_level-name option:selected'); 
						var ssid=options.text(); //拿到选中项的值
						var ssids=options.val();
						 formData.append('ssid',ssid);
						 formData.append('ssids',ssids);
						var options=$('#my_level-name1 option:selected'); 
						var ssid1=options.text(); //拿到选中项的值
						var ssids1=options.val();
						 formData.append('ssid1',ssid1);
						 formData.append('ssids1',ssids1);
						var options=$('#my_level-name2 option:selected'); 
						var ssid2=options.text(); //拿到选中项的值
						var ssids2=options.val();
						 formData.append('ssid2',ssid2);
						 formData.append('ssids2',ssids2);
						var options=$('#my_level-name3 option:selected'); 
						var ssid3=options.text(); //拿到选中项的值
						var ssids3=options.val();
						 formData.append('ssid3',ssid3);
						  formData.append('ssids3',ssids3);
						var options=$('#my_level-name4 option:selected'); 
						var ssid4=options.text(); //拿到选中项的值
						var ssids4=options.val();
						 formData.append('ssid4',ssid4);
						 formData.append('ssids4',ssids4);
						var options=$('#my_level-name5 option:selected'); 
						var ssid5=options.text(); //拿到选中项的值
						var ssids5=options.val();
						 formData.append('ssid5',ssid5);
						 formData.append('ssids5',ssids5);
						var options=$('#my_level-name6 option:selected'); 
						var ssid6=options.text(); //拿到选中项的值
						var ssids6=options.val();
						 formData.append('ssid6',ssid6);
						 formData.append('ssids6',ssids6);
						var options=$('#my_level-name7 option:selected'); 
						var ssid7=options.text(); //拿到选中项的值
						var ssids7=options.val();
						 formData.append('ssid7',ssid7);
						 formData.append('ssids7',ssids7);
											
					var ban = $('.db-left .on').val();

    				var id = $('#id').val();

					 var date = $('#date').val();

					 var grade = $('#gradee').val();

					  var leid = $('#leid').val();
					   var leid1 = $('#leid1').val();
					    var leid2 = $('#leid2').val();
					     var leid3 = $('#leid3').val();
					      var leid4 = $('#leid4').val();
					       var leid5 = $('#leid5').val();
					        var leid6 = $('#leid6').val();
					         var leid7 = $('#leid7').val();
					          formData.append('leid',leid);
					           formData.append('leid1',leid1);
					            formData.append('leid2',leid2);
					             formData.append('leid3',leid3);
					              formData.append('leid4',leid4);
					               formData.append('leid5',leid5);
					                formData.append('leid6',leid6);
					                 formData.append('leid7',leid7);

								      formData.append('id',id);

								        formData.append('date',date);

								          formData.append('grade',grade);

								            formData.append('ban',ban);


						$.ajax({
							type: "POST",
							url:"{:url('index/page')}",
							
							data: formData,
							dataType:'JSON',

                			async:"true",  
							cache: false,  

							processData: false,  

							contentType: false,
							success: function(data) {
								if (data.code == 1) {
									
							 	alert(data.msg);
							}else{
							 	alert(data.msg);
							 

								//location.reload(true);
							 }
							}
						});
					}else{
									var formData = new FormData

						var options=$('#my_level-names option:selected'); 
						var ssid=options.text(); //拿到选中项的值
						var ssids=options.val();
						
						 formData.append('ssid',ssid);
						  formData.append('ssids',ssids);
						var options=$('#my_level-names1 option:selected'); 
						var ssid1=options.text(); //拿到选中项的值
						var ssids1=options.val();
						
						 formData.append('ssid1',ssid1);
						 formData.append('ssids1',ssids1);
						var options=$('#my_level-names2 option:selected'); 
						var ssid2=options.text(); //拿到选中项的值
						var ssids2=options.val();
						 formData.append('ssid2',ssid2);
						 formData.append('ssids2',ssids2);
						var options=$('#my_level-names3 option:selected'); 
						var ssid3=options.text(); //拿到选中项的值
						var ssids3=options.val();
						 formData.append('ssid3',ssid3);
						 formData.append('ssids3',ssids3);
						var options=$('#my_level-names4 option:selected'); 
						var ssid4=options.text(); //拿到选中项的值
						var ssids4=options.val();
						 formData.append('ssid4',ssid4);
						 formData.append('ssids4',ssids4);
						var options=$('#my_level-names5 option:selected'); 
						var ssid5=options.text(); //拿到选中项的值
						var ssids5=options.val();
						 formData.append('ssid5',ssid5);
						 formData.append('ssids5',ssids5);
						var options=$('#my_level-names6 option:selected'); 
						var ssid6=options.text(); //拿到选中项的值
						var ssids6=options.val();
						 formData.append('ssid6',ssid6);
						 formData.append('ssids6',ssids6);
						var options=$('#my_level-names7 option:selected'); 
						var ssid7=options.text(); //拿到选中项的值
						var ssids7=options.val();
						 formData.append('ssid7',ssid7);
						 formData.append('ssids7',ssids7);
											
					var ban = $('.db-left .on').val();

    				var id = $('#id').val();

					 var date = $('#date').val();

					 var grade = $('#gradee').val();

					  var id = $('#id0').val();
					   var id1 = $('#id1').val();
					    var id2 = $('#id2').val();
					     var id3 = $('#id3').val();
					      var id4 = $('#id4').val();
					       var id5 = $('#id5').val();
					        var id6 = $('#id6').val();
					         var id7 = $('#id7').val();
					          formData.append('id',id);
					           formData.append('id1',id1);
					            formData.append('id2',id2);
					             formData.append('id3',id3);
					              formData.append('id4',id4);
					               formData.append('id5',id5);
					                formData.append('id6',id6);
					                 formData.append('id7',id7);

									   formData.append('id',id);

										 formData.append('date',date);

										  formData.append('grade',grade);

										   formData.append('ban',ban);
										  

						$.ajax({
							type: "POST",
							url:"{:url('index/pages')}",
							
							data: formData,
							dataType:'JSON',

							async:"true",

							cache: false,  

							processData: false,  

							contentType: false,
							success: function(data) {
								if (data.code == 1) {
									
							 	alert(data.msg);
							}else{
							 	alert(data.msg);
							 

								//location.reload(true);
							 }
							}
						});
					}

				})

			 })

			
			
			
		</script>


		<script type="text/javascript">
			$(function() {
				$(".db-left ul li").click(function() {
					get();
				})
			})

		</script>

		<script type="text/javascript">
			function get(){
					var formData = new FormData

					var ban = $('.db-left .on').val();


    				var id = $('#id').val();

					 var date = $('#date').val();

					 var grade = $('#gradee').val();

					 formData.append('id',id);

					 formData.append('date',date);

					 formData.append('grade',grade);

					 formData.append('ban',ban);
					$.ajax({

						type: "POST",

						url:"{:url('index/sousou')}",

						data:formData,

						dataType: 'JSON',

						cache: false,  

						processData: false,  

						contentType: false,

						success: function(data) {

							if (data.code == 1) {
								
								gst();
								$('#fgfg').val('1');

								var name0 = $('#leid').val(data.data[0] ['lesson_id']);
								var name0 = $('#leid1').val(data.data[1] ['lesson_id']);
								var name0 = $('#leid2').val(data.data[2] ['lesson_id']);
								var name0 = $('#leid3').val(data.data[3] ['lesson_id']);
								var name0 = $('#leid4').val(data.data[4] ['lesson_id']);
								var name0 = $('#leid5').val(data.data[5] ['lesson_id']);
								var name0 = $('#leid6').val(data.data[6] ['lesson_id']);
								var name0 = $('#leid7').val(data.data[7] ['lesson_id']);


								
								$("#name0").text(data.data[0] ['name']); 
								$("#name1").text(data.data[1] ['name']); 
								$("#name2").text(data.data[2] ['name']); 
								$("#name3").text(data.data[3] ['name']); 
								$("#name4").text(data.data[4] ['name']); 
								$("#name5").text(data.data[5] ['name']); 
								$("#name6").text(data.data[6] ['name']); 
								$("#name7").text(data.data[7] ['name']);
							}else{
							
							gst();

								$('#fgfg').val('1');

								var name0 = $('#leid').val('');
								var name0 = $('#leid1').val('');
								var name0 = $('#leid2').val('');
								var name0 = $('#leid3').val('');
								var name0 = $('#leid4').val('');
								var name0 = $('#leid5').val('');
								var name0 = $('#leid6').val('');
								var name0 = $('#leid7').val('');

								
								$("#name0").text(''); 
								$("#name1").text(''); 
								$("#name2").text(''); 
								$("#name3").text(''); 
								$("#name4").text(''); 
								$("#name5").text(''); 
								$("#name6").text(''); 
								$("#name7").text('');
							
							}
							

						
						}

					})
			}
		</script>

		<script type="text/javascript">
			function gst(){

				$(".dr-a .ts").hide();
				$(".dr-a .td").show();
			}
				 $(".dr-a .td").hide();
		</script>

		<script>

			(function($) {
				$.init();
				var result = $('.date')[0];
				var btns = $('.date');
				btns.each(function(i, btn) {
					btn.addEventListener('tap', function() {

						var _self = this;
						if(_self.picker) {
							_self.picker.show(function (rs) {
								result.innerText = '选择结果: ' + rs.text;
								_self.picker.dispose();
								_self.picker = null;
							});
						} else {
							var optionsJson = this.getAttribute('data-options') || '{}';
							var options = JSON.parse(optionsJson);
							var id = this.getAttribute('id');
							/*
							 * 首次显示时实例化组件
							 * 示例为了简洁，将 options 放在了按钮的 dom 上
							 * 也可以直接通过代码声明 optinos 用于实例化 DtPicker
							 */
							_self.picker = new $.DtPicker(options);
							_self.picker.show(function(rs) {
								//console.log(rs.text);
								result.value = rs.text;
								/* 
								 * 返回 false 可以阻止选择框的关闭
								 * return false;
								 */
								/*mui-btn mui-btn-blue
								 * 释放组件资源，释放后将将不能再操作组件
								 * 通常情况下，不需要示放组件，new DtPicker(options) 后，可以一直使用。
								 * 当前示例，因为内容较多，如不进行资原释放，在某些设备上会较慢。
								 * 所以每次用完便立即调用 dispose 进行释放，下次用时再创建新实例。
								 */
								_self.picker.dispose();
								_self.picker = null;
								
								get();
								
							});
						}
						
					}, false);
				});
			})(mui);
		</script>

		
		
		<!--年级选择-->
		<script>
			(function($, doc) {
				$.init();
				$.ready(function() {
					/**
					 * 获取对象属性的值
					 * 主要用于过滤三级联动中，可能出现的最低级的数据不存在的情况，实际开发中需要注意这一点；
					 * @param {Object} obj 对象
					 * @param {String} param 属性名
					 */
					var _getParam = function(obj, param) {
						return obj[param] || '';
					};
					//普通示例
					var userPicker = new $.PopPicker();
					userPicker.setData([{
						value: '1',
						text: '一年级'
					}, {
						value: '2',
						text: '二年级'
					}, {
						value: '3',
						text: '三年级'
					}, {
						value: '4',
						text: '四年级'
					}, {
						value: '5',
						text: '五年级'
					}, {
						value: '6',
						text: '六年级'
					}, {
						value: '7',
						text: '七年级'
					}, {
						value: '8',
						text: '八年级'
					}, {
						value: '9',
						text: '九年级'
					}, {
						value: '10',
						text: '十年级'
					}, {
						value: '11',
						text: '十一年级'
					}, {
						value: '12',
						text: '十二年级'
					}, {
						value: '13',
						text: '十三年级'
					}, {
						value: '14',
						text: '十四年级'
					}, {
						value: '15',
						text: '十五年级'
					}
					]);
					var showUserPickerButton = doc.getElementById('grade');
					var grade = doc.getElementById('grade');
					showUserPickerButton.addEventListener('tap', function(event) {
						userPicker.show(function(items) {
							grade.value = items[0].text;
							gradee.value = items[0].value;
							//返回 false 可以阻止选择框的关闭userResult
							//return false;
							get();
						});
					}, false);
				});
			})(mui, document);
		</script>
		
		<!--课程选择-->
		<script>
			$(".dr-a ul li select").change(function(){
				if($(this).val() != 0){
					$(this).siblings("button").show();
				}else{
					$(this).siblings("button").hide();
				}
			})
			$(".dr-a ul li button").click(function(){
				$(this).hide();
				$(this).siblings("select").val(0);

			})

			
		</script>

		<script>
			
		$(function(){
			$("#ff").click(function(){
				
				$(".dr-a ul button").hide();
				
			})

		})

			
		</script>

		<!-- 获取当天日期 -->
		<script type="text/javascript">
			var t=new Date();

			var y=t.getFullYear();

			var m=t.getMonth()+1;

			if(m<10){

			m="0"+m;

			}

			var d=t.getDate();

			var theday=y+"-"+m+"-"+d;

			var theday = $('#date').val(theday);

		</script>
		<!-- 班级选择 -->
		<script type="text/javascript">

			$(".db-left ul li").click(function(){
  			$(".db-left ul li").removeClass("on");
  			$(this).addClass("on");
			  });
		</script>


	</body>
</html>
